package cn.schoolwow.quickdao.module.database.dql.condition.service;

import cn.schoolwow.quickdao.module.database.dql.condition.flow.common.BeforeExecuteConditionFlow;
import cn.schoolwow.quickdao.module.database.dql.condition.flow.common.SetJoinTableIndexFlow;
import cn.schoolwow.quickdao.module.database.dql.condition.flow.set.SetFromTableFragmentFlow;
import cn.schoolwow.quickdao.module.database.dql.condition.flow.set.SetJoinTableFragmentFlow;
import cn.schoolwow.quickdao.module.database.dql.condition.flow.set.SetQueryColumnListFlow;
import cn.schoolwow.quickdao.module.database.dql.condition.flow.set.SetQueryFragmentFlow;
import cn.schoolwow.quickdao.module.database.dql.condition.flow.update.SetUpdateFragmentFlow;
import cn.schoolwow.quickflow.QuickFlowExecutor;
import cn.schoolwow.quickflow.flow.CompositeBusinessFlow;

public class ExecuteConditionCompositeBusiness implements CompositeBusinessFlow {
    @Override
    public void executeCompositeBusiness(QuickFlowExecutor quickFlowExecutor) {
        quickFlowExecutor.next(new BeforeExecuteConditionFlow())
                .next(new SetJoinTableIndexFlow())
                .next(new SetQueryColumnListFlow())
                .next(new SetFromTableFragmentFlow())
                .next(new SetJoinTableFragmentFlow())
                .next(new SetQueryFragmentFlow())
                .next(new SetUpdateFragmentFlow());
    }

    @Override
    public String name() {
        return "执行Condition对象";
    }
}
